//
// Created by Wei on 2022/5/15.
//

#ifndef B_PLUS_DB_FILE_HEADER_H
#define B_PLUS_DB_FILE_HEADER_H
typedef struct FILE_HEADER {
private:
//24 bytes
    unsigned int FIL_PAGE_SPACE_OR_CHECKSUM;//校验和
    unsigned int FIL_PAGE_OFFSET;//页号
    unsigned int FILE_PAGE_PREV;//上一页号
    unsigned int FIL_PAGE_NEXT;//下一页号
    unsigned int FIL_PAGE_TYPE;//此页类型
    unsigned int FIL_PAGE_PARENT;//他爹
//    unsigned char FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID[4]{};//页表所属空间
public:

    unsigned int getFilPageSpaceOrChecksum() const;

    void setFilPageSpaceOrChecksum(unsigned int filPageSpaceOrChecksum);

    unsigned int getFilPageOffset() const;

    void setFilPageOffset(unsigned int filPageOffset);

    unsigned int getFilePagePrev() const;

    void setFilePagePrev(unsigned int filePagePrev);

    unsigned int getFilPageNext() const;

    void setFilPageNext(unsigned int filPageNext);

    unsigned int getFilPageType() const;

    void setFilPageType(unsigned int filPageType);

    unsigned int getFilPageParent() const;

    void setFilPageParent(unsigned int filPageParent);
//    const unsigned char *getFilPageArchLogNoOrSpaceId() const;
//
//    void setFilPageArchLogNoOrSpaceId(const unsigned char *spaceid);
} FILE_HEADER;
#endif //B_PLUS_DB_FILE_HEADER_H
